<template>
	<view class="bottomBar">
		<view class="bar-left">
			<u-icon name="phone-fill" color="#3e3E3E" size="17" 
			label="电话咨询" labelPos="bottom" labelSize="12"></u-icon>
			<!-- <u-icon name="star-fill" color="#3e3E3E" size="17" v-show="details.collection"
			label="收藏" labelPos="bottom" labelSize="12" @click="collectionClick"></u-icon>
			<u-icon name="star" color="#3e3E3E" size="17" v-show="!details.collection"
			label="收藏" labelPos="bottom" labelSize="12" @click="collectionClick"></u-icon> -->
		</view>
		<view class="bar-right">
			<view class="btn">
				<u-button text="联系卖家" @click="toChat"></u-button>
			</view>
			<view class="btn">
				<u-button type="primary" text="立即下单" @click="addOrder"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			details: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			collectionClick(){
				this.$emit('collectionEvent',this.details.car_id)
			},
			toChat(){
				uni.showToast({
					icon:'none',
					title:'聊天系统即将上线，敬请期待！'
				})
			},
			addOrder(){
				this.$emit('addOrder',this.details.car_id)
			},
		}
	}
</script>

<style lang="scss" scoped>
.bottomBar{
	width: 100%;
	height: 50px;
	background: #fff;
	position: fixed;
	bottom: 0;
	display: flex;
	box-shadow: 0px -1px 10px 0px rgba(244,244,244,0.99);
	.bar-left{
		width: 35%;
		display: flex;
		justify-content: space-evenly;
	}
	.bar-right{
		width: 65%;
		display: flex;
		justify-content: space-evenly;
		align-items: center;
		.btn{
			width: 200upx;
			height: 80upx;
		}
	}
	
}
</style>
